/*
 * ShMem.hpp
 *
 *  Created on: Nov 6, 2013
 *      Author: vladimir
 */

#ifndef SHMEM_HPP_
#define SHMEM_HPP_

#include <string>


namespace vjipc
{

enum class AccessType;


class ShMem
{

public:

	ShMem( const vjipc::AccessType & accessType,
	       const std::string & name,
	       const unsigned int lenght );
	~ShMem();

	ShMem( const ShMem& ) = delete;
	ShMem& operator=( const ShMem& ) = delete;

	ShMem( ShMem&&  rhs );
	ShMem& operator=( ShMem&& rhs );


	int GetFileDescriptor() const;

private:

	std::string name;
	int shMemDesc;
};

} /* namespace vjipc */

#endif /* SHMEM_HPP_ */
